package com.peanut.web.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/")
public class AdminController extends BaseController {

	@RequestMapping(value = "/index")
	public ModelAndView index(ModelAndView mav) {

		return mav;
	}

	@RequestMapping(value = "/main")
	public ModelAndView main(ModelAndView mav) {
		// List<Resource> moduleList = moduleManager.queryTopLevelModules();
		// List<Resource> moduleList = moduleManager.getAll();
		// mav.addObject("moduleList", moduleList);
		Object obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
		return mav;
	}

}
